<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function isZhiShu(num) {
        if (num <= 1) {
          return false
        }
        for (var i = 2; i <= Math.sqrt(num); i++) {
          if (num % i == 0) {
            return false
          }
        }
        return true
      }
      for (j = 1; j <= 100; j++) {
        if (isZhiShu(j)) {
          console.log(j)
        }
      }
    </script>
  </body>
</html>
